<template>
	<div>
        <!--<XzComponent v-if = "lx == 'xz'"></XzComponent>
        <CwComponent v-if = "lx == 'cw'"></CwComponent>
        <LsComponent v-if = "lx == 'ls'"></LsComponent>
        <CapComponent v-if = "lx == 'cap'"></CapComponent>-->
        <Homegnlist v-if="true"></Homegnlist>
        <!--<Homeysbjlist v-if="this.$store.state.gnlist.showyukaibanlist"></Homeysbjlist>-->
        <Homerlcjlist v-if="this.qxbtn.syjscj"></Homerlcjlist>
        <Homeysbjlist v-if="this.qxbtn.syysbj"></Homeysbjlist>
        <Homeykbjlist v-if="this.qxbtn.syzsbj"></Homeykbjlist>
        <Homexstjlist v-if="false"></Homexstjlist>
        
        <Homekbqqlist v-if="false"></Homekbqqlist>
        <Homecwlist  v-if="false"></Homecwlist>
        <Homelscwtfshlist v-if="false"></Homelscwtfshlist>
        <Homekscjlist v-if="false"></Homekscjlist>

	</div>
</template>
<script>
	import { mapState } from 'vuex'
//  import XzComponent from './xzhome'
//  import CwComponent from './cwhome'
//  import LsComponent from './lshome'
//  import CapComponent from './caphome'
import Homeysbjlist from './xzhomezj/homeyukaibanlist'
import Homeykbjlist from './xzhomezj/homeyikaibanlist'
import Homegnlist from './xzhomezj/homegnlist'
import Homerlcjlist from './xzhomezj/homerlcjlist'
import Homekbqqlist from './xzhomezj/homekbqqlist'
import Homecwlist from './xzhomezj/homecwlist'
import Homexstjlist from './xzhomezj/homexstjlist'
import Homelscwtfshlist from './xzhomezj/homelscwtfshlist'
import Homekscjlist from './xzhomezj/homekscjlist'
     export default {
//   	 components: { CwComponent,XzComponent,LsComponent,CapComponent},
     	 components: { Homekscjlist,Homelscwtfshlist,Homeysbjlist,Homeykbjlist,Homegnlist,Homerlcjlist,Homekbqqlist,Homecwlist,Homexstjlist},
     	 data (){
     	 	return{
     	 		qxbtn:{
            	//权限
            	    syysbj:false,
            	    syzsbj:false,
            	    syjscj:false,
            	    sykbqqbk:false,
            	    sycwtj:false,
            	    sylscwtfsh:false,
            	    sykscjtj:false,

					},
     	 		lx:''
     	 	}
     	 },
     	  created () {
//   	  	alert(this.qxbtn.sykbqqbk)
     	  			var logininfo = JSON.parse(localStorage.logininfo) ;
            		this.qxbtn.syysbj = (logininfo.mkids.indexOf("syysbj")!=-1);
            		this.qxbtn.syzsbj = (logininfo.mkids.indexOf("syzsbj")!=-1);
					this.qxbtn.syjscj= (logininfo.mkids.indexOf("syjscj")!=-1);
					this.qxbtn.sykbqqbk= (logininfo.mkids.indexOf("sykbqqbk")!=-1);
					this.qxbtn.sycwtj= (logininfo.mkids.indexOf("sycwtj")!=-1);
					this.qxbtn.sylscwtfsh= (logininfo.mkids.indexOf("sylscwtfsh")!=-1);
					this.qxbtn.sykscjtj= (logininfo.mkids.indexOf("sykscjtj")!=-1);

     	  	this.$store.dispatch('changeTitle', '首页'); //修改title
			this.$store.dispatch('changeRouterIndex', '/home'); //修改路由
			this.search();
     	  },
     	  methods:{
     	  	  search () {
            var logininfo = JSON.parse(localStorage.logininfo) ;
              this.searchLoading = true;
              this.axios.get(this.$store.state.api + 'ls/getlstype',{
                  params:{
                  	yhid:logininfo.id
                  }
              }).then( res => {
                  this.lx = res.data.data[0].lstype
                  console.log(this.lx)
//                let data = res.data.data;
//                let list = data.list;
//                this.total = data.totalPage;
//                this.dataList = list;
//                this.searchLoading = false;
              }).catch( res => {
                  console.log(res)
                  this.searchLoading = false;
              })
          },
     	  }
     }
</script>


<style>
</style>
